package com.aaa.controller;

import com.aaa.service.UserService;
import com.aaa.vo.LoginVo;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * -*- coding:utf-8 -*-
 *
 * @author 太阳偷渡青山
 * @software IntelliJ IDEA
 * @date 2022/11/23 10:29
 * @Description
 */
@RestController
@RequestMapping("user")
@Api("用户的增删查改和登录退出")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public Result<String> login(@RequestBody LoginVo loginVo) {
        return userService.login(loginVo);
    }
}
